package com.breakfast.fun.data.entity.user;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by hp on 2016/8/25.
 */
public class ShopData {

    /**
     * id : 24022
     * orderId : 40601
     * orderNo : F201608252033025407
     * productId : 350
     * productPrice : 14
     * productCount : 1
     * productName : 牛奶水果养颜粥
     * free : 0
     * shopId : 31
     * categoryId : 160
     * categoryName : C17
     * productImage : http://static.52letsgo.cn//product_image/2/11/4fd07963-2_-630293569.jpg
     * totalPrice : 14
     * shopName : 太极膳
     * sendDate : 2016-08-26
     */

    private int id;
    private int orderId;
    private String orderNo;
    private int productId;
    private double productPrice;
    private int productCount;
    private String productName;
    private double free;
    private int shopId;
    private int categoryId;
    private String categoryName;
    private String productImage;
    private double totalPrice;
    private String shopName;
    private String sendDate;

    public static ShopData objectFromData(String str) {

        return new Gson().fromJson(str, ShopData.class);
    }

    public static List<ShopData> arrayShopDataFromData(String str) {

        Type listType = new TypeToken<ArrayList<ShopData>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public double getProductPrice() {
        return productPrice;
    }

    public void setProductPrice(double productPrice) {
        this.productPrice = productPrice;
    }

    public int getProductCount() {
        return productCount;
    }

    public void setProductCount(int productCount) {
        this.productCount = productCount;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public double getFree() {
        return free;
    }

    public void setFree(double free) {
        this.free = free;
    }

    public int getShopId() {
        return shopId;
    }

    public void setShopId(int shopId) {
        this.shopId = shopId;
    }

    public int getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(int categoryId) {
        this.categoryId = categoryId;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getProductImage() {
        return productImage;
    }

    public void setProductImage(String productImage) {
        this.productImage = productImage;
    }

    public double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getSendDate() {
        return sendDate;
    }

    public void setSendDate(String sendDate) {
        this.sendDate = sendDate;
    }
}
